From 5e3539a4d153dbcdbd459595094047dc99df50e3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Fri, 26 Aug 2005 13:56:25 +0000 Subject: [PATCH] * Safe html output with wfMsgHtml() * Fixed the indenting of the XML * Code cleanup --- includes/SpecialExport.php | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/includes/SpecialExport.php b/includes/SpecialExport.php index 5fda2be58e..1ce1f4f737 100644 --- a/includes/SpecialExport.php +++ b/includes/SpecialExport.php @@ -61,7 +61,7 @@ function wfSpecialExport( $page = '' ) {

+" . wfMsgHtml( 'exportcuronly' ) . "
" ); @@ -195,10 +195,8 @@ class WikiExporter { function namespaces() { global $wgContLang; $spaces = "\n"; - foreach( $wgContLang->getNamespaces() as $ns => $title ) { - $spaces .= ' ' . wfElement( 'namespace', - array( 'key' => $ns ), - str_replace( '_', ' ', $title ) ) . "\n"; + foreach( $wgContLang->getFormattedNamespaces() as $ns => $title ) { + $spaces .= ' ' . wfElement( 'namespace', array( 'key' => $ns ), $title ) . "\n"; } $spaces .= " "; return $spaces; @@ -374,33 +372,32 @@ class WikiExporter { $fname = 'WikiExporter::dumpRev'; wfProfileIn( $fname ); - print " \n"; - print " " . wfElement( 'id', null, $row->rev_id ) . "\n"; + print " \n"; + print " " . wfElement( 'id', null, $row->rev_id ) . "\n"; $ts = wfTimestamp2ISO8601( $row->rev_timestamp ); - print " " . wfElement( 'timestamp', null, $ts ) . "\n"; + print " " . wfElement( 'timestamp', null, $ts ) . "\n"; - print " "; + print " \n"; if( $row->rev_user ) { - print wfElementClean( 'username', null, $row->rev_user_text ); - print wfElement( 'id', null, $row->rev_user ); + print " " . wfElementClean( 'username', null, $row->rev_user_text ) . "\n"; + print " " . wfElement( 'id', null, $row->rev_user ) . "\n"; } else { - print wfElementClean( 'ip', null, $row->rev_user_text ); + print " " . wfElementClean( 'ip', null, $row->rev_user_text ) . "\n"; } - print "\n"; + print " \n"; if( $row->rev_minor_edit ) { - print " \n"; + print " \n"; } if( $row->rev_comment != '' ) { - print " " . wfElementClean( 'comment', null, $row->rev_comment ) . "\n"; + print " " . wfElementClean( 'comment', null, $row->rev_comment ) . "\n"; } $text = Revision::getRevisionText( $row ); - print " " . wfElementClean( 'text', - array( 'xml:space' => 'preserve' ), $text ) . "\n"; + print " " . wfElementClean( 'text', array( 'xml:space' => 'preserve' ), $text ) . "\n"; - print " \n"; + print " \n"; wfProfileOut( $fname ); -- 2.20.1